if(WIN32)
    option(WIN_USE_VCPKG "If VCPKG should be used to find libraries" ON)
    if (NOT DEFINED WIN_VCPKG_ALREADY_FOUND)
        if (WIN_USE_VCPKG)
            if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/vcpkg)
                message(FATAL_ERROR "Could not find VCPKG at ${CMAKE_CURRENT_SOURCE_DIR}/contrib/vcpkg - did you install VCPKG / prebuilt dependencies correctly?")
            endif()
        
            set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/contrib/vcpkg/scripts/buildsystems/vcpkg.cmake)
            set(WIN_VCPKG_ALREADY_FOUND true)

            message(STATUS "VCPKG directory found at ${CMAKE_TOOLCHAIN_FILE}")
        endif()
    else()
        message(STATUS "VCPKG directory already found at ${CMAKE_TOOLCHAIN_FILE}")
    endif()
endif()
